package org.ran.demo.http.stream;

public class ConsoleDemo {
    public static void main(String[] args) throws Exception{
        int counter=0;
        System.out.println("\\r的ASICC编码:"+(byte)'\r');
        System.out.println("\\n的ASICC编码:"+(byte)'\n');
        while (counter<3) {
            counter++;
            byte b = (byte) System.in.read();
            if(b==(byte)'\r') {
                System.out.println("收到: \\r");
            }else if(b==(byte)'\n') {
                System.out.println("收到: \\n");
            }else {
                System.out.println("收到: "+(char)b);
            }
        }
    }
}
